package com.springcloud.gateway.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import com.springcloud.common.core.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 网关路由表
 * </p>
 *
 * @author mori
 * @since 2019-10-29
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class GatewayRoute extends BaseEntity<GatewayRoute> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 路由id
     */
    private String routeId;

    /**
     * uri路径
     */
    private String uri;

    /**
     * 判定器
     */
    private String predicates;

    /**
     * 过滤器
     */
    private String filters;

    /**
     * 排序
     */
    private Integer orders;

    /**
     * 描述
     */
    private String description;

    /**
     * 状态：Y-有效，N-无效
     */
    private String status;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
